<style>
    body {
        background-color: #f9f9f9;
    }
</style>
<div class="container-fluid" style="height: 100%;">
    <div class="row" style="height: 100%;">
        <div class="col-md-12" style="height: 50%;overflow-y: auto;">
            <blockquote>
                <p class="text-primary">应缴记录</p>
            </blockquote>
            <table class="table table-hover">
                <thead>
                    <tr class="info">
                        <th>应缴</th>
                        <th>服务开始日期</th>
                        <th>服务结束日期</th>
                        <th>设备费</th>
                        <th>押金</th>
                        <th>服务费</th>
                        <th>辅导费</th>
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                {% for detail in details %}
                    <tr>
                        <td>{{ detail['receivable'] }}</td>
                        <td>{{ detail['serviceStart'] }}</td>
                        <td>{{ detail['serviceEnd'] }}</td>
                        <td>{{ detail['devPrice'] }}</td>
                        <td>{{ detail['depositPrice'] }}</td>
                        <td>{{ detail['servicePrice'] }}</td>
                        <td>{{ detail['tutorPrice'] }}</td>
                        <td>{{ detail['tCreateDate'] }}</td>
                        <td>
                            {% if power['detail'] %}
                                <a style="cursor: pointer;" onclick="delDetail({{ detail['id'] }})">删除</a>
                            {% endif %}
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
        <div class="col-md-12" style="height: 50%;overflow-y: auto;">
            <blockquote>
                <p class="text-primary">流水记录</p>
            </blockquote>
            <table class="table table-hover">
                <thead>
                    <tr class="info">
                        <th>发生金额</th>
                        <th>交易时间</th>
                        <th>来源类型</th>
                        <th>银行名称</th>
                        <th>银行流水</th>
                        <th>导入时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                {% for flow in flows %}
                    <tr>
                        <td>{{ flow['receiveNum'] }}</td>
                        <td>{{ flow['receiveTime'] }}</td>
                        <td>{{ flow['sourceType'] }}</td>
                        <td>{{ flow['sourceName'] }}</td>
                        <td>{{ flow['sourceNo'] }}</td>
                        <td>{{ flow['tCreateDate'] }}</td>
                        <td>
                            {% if power['flow'] %}
                                <a style="cursor: pointer;" onclick="delFlow({{ flow['id'] }})">删除</a>
                            {% endif %}
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
<script>
    function delDetail(id) {
        xhExtra.askChangeStatus('cost/delChargeDetail', {ids: [id]}, window.top.xhTop.getActiveFrame().obj.dataGrid, '确认删除?', function () {
            window.location.reload();
        });
    }
    function delFlow(id) {
        xhExtra.askChangeStatus('cost/delChargeFlow', {ids: [id]}, window.top.xhTop.getActiveFrame().obj.dataGrid, '确认删除?', function () {
            window.location.reload();
        });
    }
</script>